package com.jingli.pile.domain;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
public class TokenResult {
    @JsonProperty(value = "PlatformID")
    private String PlatformID;
    @JsonProperty(value = "SuccStat")
    private Integer SuccStat;
    @JsonProperty(value = "AccessToken")
    private String AccessToken;
    @JsonProperty(value = "TokenAvailableTime")
    private Long TokenAvailableTime;
    @JsonProperty(value = "FailReason")
    private Integer FailReason;

    public static TokenResult failure(String platformID) {
        TokenResult tokenResult = new TokenResult();
        tokenResult.setPlatformID(platformID);
        tokenResult.setSuccStat(1);
        tokenResult.setAccessToken("");
        tokenResult.setTokenAvailableTime(0L);
        tokenResult.setFailReason(2);
        return tokenResult;
    }

    public String getPlatformID() {
        return PlatformID;
    }

    public void setPlatformID(String platformID) {
        PlatformID = platformID;
    }

    public Integer getSuccStat() {
        return SuccStat;
    }

    public void setSuccStat(Integer succStat) {
        SuccStat = succStat;
    }

    public String getAccessToken() {
        return AccessToken;
    }

    public void setAccessToken(String accessToken) {
        AccessToken = accessToken;
    }

    public Long getTokenAvailableTime() {
        return TokenAvailableTime;
    }

    public void setTokenAvailableTime(Long tokenAvailableTime) {
        TokenAvailableTime = tokenAvailableTime;
    }

    public Integer getFailReason() {
        return FailReason;
    }

    public void setFailReason(Integer failReason) {
        FailReason = failReason;
    }
}
